import React, { Component } from 'react'
import '../index.css'
export class tab extends Component {
  
  render() {
    return (
      <div className="tabs-order">
      {this.props.tabs.map(item => {
        return <div className={this.props.active===item.type?'on':''} key={item.id} onClick={()=>{this.props.sort(item.type)}}>按{item.name}排序</div>
      })}
    </div>
    )
  }
}

export default tab